#################################################################
# This docker image build file creates an image that contains
# trunsmq_consumer project.
#
#                    ##        .
#              ## ## ##       ==
#           ## ## ## ##      ===
#       /""""""""""""""""\___/ ===
#  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
#       \______ o          __/
#         \    \        __/
#          \____\______/
#
# Component:    RNTD
# Author:       Dou Chunrong <douchunrong@gmail.com>
# Copyright:    (c) 2015-2016 RNTD Ltd. All rights reserved.
#################################################################
#Version 0.0.1
FROM douchunrong/docker_golang


#项目配置
ENV CONSUMER_PATH $GOPATH/src/trustmq_consumer

RUN mkdir $CONSUMER_PATH
ADD script/trustmq_consumer  $CONSUMER_PATH
ADD script/start.sh /usr/local/
RUN mkdir script

RUN go get github.com/Shopify/sarama
RUN go get gopkg.in/yaml.v2
RUN go get github.com/astaxie/beego/orm
RUN go get github.com/go-sql-driver/mysql

WORKDIR $CONSUMER_PATH/
RUN mkdir logs
ADD script/trustmq_consumer.log  $CONSUMER_PATH/logs/
RUN chmod 777 build.sh
RUN chmod 777 /usr/local/start.sh

CMD /usr/local/start.sh


